/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.util.HashSet;

/**
 * 
 * @author Christian Gartner nielsen
 */
public class ItemGroup {
	private String name;
	private HashSet<Item> items;

	public ItemGroup() {
		name = "";
		items = new HashSet<Item>();

	}

	public Item[] getItems() {
		return items.toArray(new Item[items.size()]);
	}

	public void addItem(Item item) {
		items.add(item);
	}

	public boolean hasItem(Item item) {
		return items.contains(item);
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	void removeItem(Item item) {
		items.remove(item);
	}
}
